import 'package:hrf_app/common/api/http_head.dart';
import 'package:hrf_app/common/services/wp_http.dart';

class MaterialApi {
  //bug分页查询
  static Future<Map<String, dynamic>> getMaterialPageListApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/api/v1/maMaterials/pageApp",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
  //根据id查询详情

  static Future<Map<String, dynamic>> getMaterialByIdApi(data) async {
    var res = await WPHttpService.to.get(
      "${HttpHead.getHttpHead()}/api/v1/maMaterials/form/getById",
      params: data,
    );
    var aa = res.data;
    return aa;
  }
  //根据id查询删除


  //单一修改
  static Future<Map<String, dynamic>> updatePjProjectBugSingleApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/pjProjectBug/updatePjProjectBugSingle",
      data: data,
    );
    var aa = res.data;
    return aa;
  }

//保存
  static Future<Map<String, dynamic>> addMaterialApi(data) async {
    var res = await WPHttpService.to.post(
      "${HttpHead.getHttpHead()}/api/v1/maMaterials",
      data: data,
    );
    var aa = res.data;
    return aa;
  }
}
